from flask import Flask, render_template
from apps.cms import bp as cms_bp
from apps.common import bp as common_bp
from apps.front import bp as front_bp
from apps.ueditor import bp as ueditor_bp
from exts import db,mail,alidayu
from flask_wtf import CSRFProtect
import config

app = Flask(__name__)
app.config.from_object(config)
CSRFProtect(app)
db.init_app(app)
mail.init_app(app)
alidayu.init_app(app)

#蓝图注册
app.register_blueprint(cms_bp)
app.register_blueprint(common_bp)
app.register_blueprint(front_bp)
app.register_blueprint(ueditor_bp)

@app.route('/')
def index():
    return 'Come on ,Dx'

if __name__ == '__main__':
    app.run(port=5000)
